From: Hyungwon Hwang Date: Fri, 10 Jun 2016 10:34:48 +0000 (+0900) Subject: background: free MetaBackground explicitly when its MetaBackgroundActor is destroyed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~819 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e72d388a674d4f7c42f5b532ffd9c43aa29bcc27;p=gnome-shell.git background: free MetaBackground explicitly when its MetaBackgroundActor is destroyed The memory which MetaBackground resides is freed automatically, when its wrapper object Background is freed by garbage collection. But because the memory for MetaBackground is huge, changing the background or changing the background mode repeatedly makes a lot of memory to be in use until garbage collection runs. This patch frees the MetaBackground object explicitly when its MetaBackgroundActor is destroyed which is the moment that the memory in the object is not used anymore. https://bugzilla.gnome.org/show_bug.cgi?id=766353 Signed-off-by: Hyungwon Hwang --- diff --git a/js/ui/background.js b/js/ui/background.js index 5db1e6c8c..762c76c6e 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -696,6 +696,7 @@ const BackgroundManager = new Lang.Class({ time: FADE_ANIMATION_TIME, transition: 'easeOutQuad', onComplete: function() { + oldBackgroundActor.background.run_dispose(); oldBackgroundActor.destroy(); } });